Image capture apparatus and control method thereof

ABSTRACT

A method of an apparatus includes detecting a focusing state based on an output from a sensor, setting a step width of a focus position, and controlling to perform a plurality of times of image capturing based on a result of focus detection by the detecting and the set step width by the setting. In the setting, a step width from an in-focus position based on the result of focus detection by the detecting toward an infinity side is set to a value different from a step width from the in-focus position based on the result of focus detection by the detecting toward a closest side.

BACKGROUND OF THE INVENTION Field of the Invention

The aspect of the embodiments relates to a focus adjustment technique inan image capture apparatus having a focus bracket shooting function.

Description of the Related Art

Among image capture apparatuses such as an electronic still camera, animage capture apparatus is conventionally known which records aplurality of images whose focal distance is shifted back and forth inone release in order to capture a close-up photo that is difficult to befocused or quickly capture an image of a moving object and from whichone best image can be selected after image capturing. The image captureapparatus can simultaneously record a plurality of images whose focaldistances are different, so that the method of the image captureapparatus is called “focus bracket shooting”. Further, it is possible tocreate an image that is depth-composed in the image capture apparatus byusing the images recorded by the focus bracket shooting.

In Japanese Patent Laid-Open No. H09-135812, a plurality of times ofimage capturing is performed while varying focus by using an in-focusposition as a reference value of focus variation image capturing. Forexample, a technique is proposed where image capturing is performed atotal of five times at −1.0 D, −0.5 D, OD, +0.5 D, and +1.0 D. Further,Japanese Patent No. 5278564 discloses that when performing the focusbracket shooting and capturing a plurality of images front and rear ofan in-focus point determined by a camera, the greater a focus evaluationvalue at the determined in-focus point, the smaller focus variationintervals.

However, in the conventional techniques disclosed in Japanese PatentLaid-Open No. H09-135812 and Japanese Patent No. 5278564 describedabove, images are captured at equal intervals by using the in-focusposition as a reference value of the focus variation image capturing.Therefore, when trying to capture an image of an object such as, forexample, a flower, there is a case where stamen or the like is focusedand a front region such as petals and leaves are difficult to befocused. In addition, even in an object such as a clock, there is asituation where a front region is difficult to be focused in some cases.

SUMMARY OF THE INVENTION

A method of an apparatus having a sensor having a plurality of pixels,each of which photoelectrically converts light fluxes that have passedthrough different pupil regions of an optical system including a focuslens and output a pair of signals for focus detection. The methodincludes detecting a focusing state based on an output from the sensor,setting a step width of a position of the focus lens, and controlling toperform a plurality of times of image capturing based on a result offocus detection by the detecting and the set step width by the setting.In the setting, a step width from an in-focus position based on theresult of focus detection by the detecting toward an infinity side isset to a value different from a step width from the in-focus positionbased on the result of focus detection by the detecting toward a closestside.

Further features of the disclosure will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A and 1B illustrate a block diagram showing a configuration of animage capture apparatus in an embodiment of the disclosure.

FIG. 2A is a diagram showing a pixel arrangement of an image captureelement 22 in an embodiment of the disclosure. FIG. 2B is a diagramshowing a configuration example of a readout circuit of the imagecapture element 22 in the embodiment of the disclosure.

FIGS. 3A and 3B are diagrams for explaining a conjugate relation betweenan exit pupil surface of an image capturing optical system in theembodiment of the disclosure and a photoelectric conversion unit of animage capture element arranged at statue height zero, that is, close toa center of an image plane.

FIG. 4 is a block diagram showing a configuration of a TVAF focusdetection unit in the embodiment of the disclosure.

FIG. 5 is a flowchart showing image capturing mode processing in theembodiment of the disclosure.

FIG. 6 is a flowchart showing image capturing mode processing in theembodiment of the disclosure.

FIG. 7 is a flowchart showing image capturing mode processing in theembodiment of the disclosure.

FIGS. 8A to 8E are schematic diagrams showing a screen example in theembodiment of the disclosure.

FIGS. 9A to 9C are schematic diagrams showing an in-focus position, astep width, and an image capturing order in the embodiment of thedisclosure.

FIG. 10 is a flowchart showing image capturing mode processing in anembodiment 2 of the disclosure.

FIG. 11 is a flowchart showing image capturing mode processing in anembodiment 3 of the disclosure.

DESCRIPTION OF THE EMBODIMENTS

Elements of one embodiment may be implemented by hardware, firmware,software or any combination thereof. The term hardware generally refersto an element having a physical structure such as electronic,electromagnetic, optical, electro-optical, mechanical,electro-mechanical parts, etc. A hardware implementation may includeanalog or digital circuits, devices, processors, applications specificintegrated circuits (ASICs), programmable logic devices (PLDs), fieldprogrammable gate arrays (FPGAs), or any electronic devices. The termsoftware generally refers to a logical structure, a method, a procedure,a program, a routine, a process, an algorithm, a formula, a function, anexpression, etc. The term firmware generally refers to a logicalstructure, a method, a procedure, a program, a routine, a process, analgorithm, a formula, a function, an expression, etc., that isimplemented or embodied in a hardware structure (e.g., flash memory,ROM, EPROM). Examples of firmware may include microcode, writablecontrol store, micro-programmed structure. When implemented in softwareor firmware, the elements of an embodiment may be the code segments toperform the necessary tasks. The software/firmware may include theactual code to carry out the operations described in one embodiment, orcode that emulates or simulates the operations. The program or codesegments may be stored in a processor or machine accessible medium. The“processor readable or accessible medium” or “machine readable oraccessible medium” may include any medium that may store information.Examples of the processor readable or machine accessible medium that maystore include a storage medium, an electronic circuit, a semiconductormemory device, a read only memory (ROM), a flash memory, a UniversalSerial Bus (USB) memory stick, an erasable programmable ROM (EPROM), afloppy diskette, a compact disk (CD) ROM, an optical disk, a hard disk,etc. The machine accessible medium may be embodied in an article ofmanufacture. The machine accessible medium may include information ordata that, when accessed by a machine, cause the machine to perform theoperations or actions described above. The machine accessible medium mayalso include program code, instruction or instructions embedded therein.The program code may include machine readable code, instruction orinstructions to perform the operations or actions described above. Theterm “information” or “data” here refers to any type of information thatis encoded for machine-readable purposes. Therefore, it may includeprogram, code, data, file, etc.

All or part of an embodiment may be implemented by various meansdepending on applications according to particular features, functions.These means may include hardware, software, or firmware, or anycombination thereof. A hardware, software, or firmware element may haveseveral modules coupled to one another. A hardware module is coupled toanother module by mechanical, electrical, optical, electromagnetic orany physical connections. A software module is coupled to another moduleby a function, procedure, method, subprogram, or subroutine call, ajump, a link, a parameter, variable, and argument passing, a functionreturn, etc. A software module is coupled to another module to receivevariables, parameters, arguments, pointers, etc. and/or to generate orpass results, updated variables, pointers, etc. A firmware module iscoupled to another module by any combination of hardware and softwarecoupling methods above. A hardware, software, or firmware module may becoupled to any one of another hardware, software, or firmware module. Amodule may also be a software driver or interface to interact with theoperating system running on the platform. A module may also be ahardware driver to configure, set up, initialize, send and receive datato and from a hardware device. An apparatus may include any combinationof hardware, software, and firmware modules.

Hereinafter, an exemplary embodiment of the disclosure will be describedin detail with reference to the attached drawings.

<Configuration of Image Capture Apparatus>

In the present embodiment, as an example of an image capture apparatus,a case will be described where the disclosure is applied to alens-exchangeable single-lens reflex type digital camera.

FIGS. 1A and 1B illustrate a block diagram showing a configuration of amain part of the image capture apparatus. As shown in FIGS. 1A and 1B,the image capture apparatus 100 has a lens unit 110 and a camera mainbody 120.

The lens unit 110 is attached to the camera main body 120 through amount M indicated by a dotted line at the center of FIGS. 1A and 1B. Thelens unit 110 has an optical system (a first lens group 101, a diaphragm102, a second lens group 103, a focus lens group (hereinafter simplyreferred to as a focus lens) 104, and a drive/control system. In thepresent embodiment, the lens unit 110 includes the focus lens 104 and isan image capturing lens that forms an optical image of an object. Thefirst lens group 101 is arranged at the tip of the lens unit 110 on theobject side and is held slidably in an optical axis direction OA. Thediaphragm 102 has not only a function of adjusting a light amount duringimage capturing but also a function of a mechanical shutter thatcontrols exposure time during still image image capturing. The diaphragm102 and the second lens group 103 can integrally move in the opticalaxis direction OA and realize a zoom function by moving interlockingwith the first lens group 101. The focus lens 104 can also move in theoptical axis direction OA. An object distance (focal distance) where thelens unit 110 is focused changes according to the position of the focuslens 104. A focus adjustment where the focal distance of the lens unit110 is adjusted is performed by controlling the position of the focuslens 104 in the optical axis direction OA.

Here, a lens drive method that performs position control of the focuslens 104 will be briefly described. As the lens drive method, there aremainly an ultrasonic wave motor drive method and a DC motor drivemethod. The ultrasonic wave motor drive method is a method that drivesthe lens by an ultrasonic wave. A rotor is physically moved by vibratinga driver of a stator, so that a driving sound is small and a lenspositioning accuracy is high. On the other hand, the DC motor drivemethod is a method that drives the lens by a DC motor. The lens isdriven through a gear, so that a driving sound is large and a lenspositioning accuracy is inferior to that of the ultrasonic wave motordrive method.

The drive/control system has a zoom actuator 111, a diaphragm shutteractuator 112, a focus actuator 113, a zoom drive circuit 114, adiaphragm shutter drive circuit 115, a focus drive circuit 116, a lensMPU 117, and a lens memory 118. The zoom drive circuit 114 drives thefirst lens group 101 and the second lens group 103 in the optical axisdirection OA by using the zoom actuator 111 and controls a field angleof an optical system of the lens unit 110. The diaphragm shutter drivecircuit 115 drives the diaphragm 102 by using the diaphragm shutteractuator 112 and controls an aperture diameter and an opening andclosing operation. The focus drive circuit 116 drives the focus lens 104in the optical axis direction OA by using the focus actuator 113 andcontrols the focal distance of the optical system of the lens unit 110.Further, the focus drive circuit 116 detects a present position of thefocus lens 104 by using the focus actuator 113. The lens MPU (processor)117 performs all calculations and controls related to the lens unit 110and controls the zoom drive circuit 114, the diaphragm shutter drivecircuit 115, and the focus drive circuit 116. Further, the lens MPU 117is connected with a system control unit 50 through the mount M andcommunicates commands and data. For example, the lens MPU 117 detects aposition of the focus lens 104 and notifies of lens position informationin response to a request from the system control unit 50. The lensposition information includes information such as a position of thefocus lens 104 in the optical axis direction OA, a position in theoptical axis direction OA and a diameter of an exit pupil in a statewhere the optical system does not move, and a position in the opticalaxis direction OA and a diameter of a lens frame that restricts lightflux of the exit pupil. Further, the lens MPU 117 controls the zoomdrive circuit 114, the diaphragm shutter drive circuit 115, and thefocus drive circuit 116 in response to a request from the system controlunit 50. The lens memory 118 stores optical information for automaticfocus detection in advance. The system control unit 50 controls anoperation of the lens unit 110 by, for example, executing a programstored in an embedded non-volatile memory or the lens memory 118.

The camera main body 120 has an optical system (an optical low-passfilter 21 and an image capture element 22) and a drive/control system.The first lens group 101, the diaphragm 102, the second lens group 103,and the focus lens 104 of the lens unit 110 and the optical low-passfilter 21 of the camera main body 120 constitute an image capturingoptical system.

The optical low-pass filter 21 reduces false color and moire of acaptured image. The image capture element 22 is composed of a CMOS imagesensor and a peripheral circuit and is arranged with m pixels in thehorizontal direction and n pixels in the vertical direction (n and m areintegers of 2 or more). The image capture element 22 of the presentembodiment has a pupil-dividing function and can perform phasedifference AF using image data. An image processing unit 24 generatesdata for the phase difference AF and image data for display, recording,and a contrast focus detection method (contrast AF, TVAF) from imagedata outputted from the image capture element 22. Further, the imageprocessing unit 24 performs resizing processing such as predeterminedpixel interpolation and reduction and color conversion processing ondata from an A/D converter 23 or data from a memory control unit 15.Further, the image processing unit 24 performs predetermined calculationprocessing by using captured image data, and the system control unit 50performs exposure control and focus detection control based on anobtained calculation result. Thereby, AF (autofocus) processing, AE(automatic exposure) processing, and EF (flash preliminary lightemission) processing of TTL (through-the-lens) method are performed. Theimage processing unit 24 further performs predetermined calculationprocessing by using captured image data and performs AWB (automaticwhite balance) processing of TTL method based on an obtained calculationresult.

Data outputted from the A/D converter 23 is directly written into amemory 32 through the image processing unit 24 and the memory controlunit 15 or through the memory control unit 15. The memory 32 storesimage data which is obtained by the image capture element 22 andconverted into digital data by the A/D converter 23 and image data to bedisplayed on the display unit 28. The memory 32 has a sufficient storagecapacity to store a predetermined number of still images and a movingimage and a sound of a predetermined period of time.

The memory 32 is also used as a memory (video memory) for image display.A D/A converter 13 converts data for image display stored in the memory32 into an analog signal and supplies the analog signal to the displayunit 28. In this way, the image data for display written into the memory32 is displayed by the display unit 28 through the D/A converter 13. Thedisplay unit 28 performs display according to the analog signal from theD/A converter 13 on a display device such as an LCD. It is possible toperform through-image display (live view display) by analog-converting adigital signal, which is once A/D-converted by the A/D converter 23 andaccumulated in the memory 32, in the D/A converter 13, consecutivelytransferring the analog signal to the display unit 28, and displayingthe consecutively transferred analog signal.

A non-volatile memory 56 is a memory used as an electricallyerasable/recordable recording medium. For example, an EEPROM is used asthe non-volatile memory 56. The non-volatile memory 56 stores constants,programs, and the like for operation of the system control unit 50. Theprograms here are computer programs for executing various flowchartsdescribed later in the present embodiment.

The system control unit 50 controls the entire image capture apparatus100. The system control unit 50 is connected with the lens MPU 117through a signal line of the mount M and communicates commands and datawith the lens MPU 117. Further, the system control unit 50 issues anacquisition request of a lens position, a drive request of thediaphragm, the focus lens, and the zoom by a predetermined drive amount,and an acquisition request of optical information unique to the lensunit 110 to the lens MPU 117. Further, the system control unit 50realizes each processing of the present embodiment described later byexecuting a program stored in the non-volatile memory 56 describedabove. A RAM is used as a system memory 52. In the system memory 52,constants and variables for operation of the system control unit 50 anda program and the like read out from the non-volatile memory 56 areunfolded. Further, the system control unit 50 also performs displaycontrol by controlling the memory 32, the D/A converter 13, the displayunit 28, and the like. A system timer 53 is a clocking unit thatmeasures time used for various controls and time of a built-in clock.

A mode switching switch 60, a shutter button 61, an operation unit 70are operation units for inputting various operation instructions to thesystem control unit 50. The mode switching switch 60 switches anoperation mode of the system control unit 50 to one of a still imagerecording mode, a moving image capturing mode, a playback mode, and thelike. The still image recording mode includes an automatic imagecapturing mode, an automatic scene determination mode, a manual mode,various scene modes where an image capturing setting is set for eachimage capturing scene, a program AE mode, and a custom mode. It ispossible to directly switch to one of these modes included in a menubutton by the mode switching switch 60. Alternatively, it is possible toswitch to one of these modes included in the menu button by usinganother operation member after once switching to the menu button by themode switching switch 60. Similarly, the moving image capturing mode mayinclude a plurality of modes.

A first shutter switch 62 turns ON and generates a first shutter switchsignal SW1 in the middle of an operation of the shutter button 61provided to the camera main body 120 of the image capture apparatus 100,that is, in a state of half press (image capturing preparationinstruction). Operations such as the AF (autofocus) processing, the AE(automatic exposure) processing, the AWB (automatic white balance)processing, and the EF (flash preliminary light emission) processing arestarted by the first shutter switch signal SW1.

A second shutter switch 64 turns ON and generates a second shutterswitch signal SW2 when the shutter button 61 has been fully operated, orfully pressed (image capturing instruction). By the second shutterswitch signal SW2, the system control unit 50 starts a series of imagecapturing processing operations from readout of a signal from the imagecapture element 22 to writing image data to a recording medium 200.

Each operation member of the operation unit 70 is appropriately assignedwith a function for each scene and operates as various function buttonsby selecting and operating various function icons displayed on thedisplay unit 28. As the function buttons, there are, for example, an endbutton, a return button, an image feeding button, a jump button, anarrowing-down button, and an attribute change button. For example, whenthe menu button is pressed, a menu screen where various settings can beperformed is displayed on the display unit 28. A user can intuitivelyperform various settings by using the menu screen displayed on thedisplay unit 28, a four-direction (up, down, left, and right) button,and a set button. Further, for example, when a live view button ispressed, it is possible to switch display/non-display of an imageacquired through the image capture element 22 on the display unit 28.

The operation unit 70 includes a touch panel 70 a that can detect atouch to the display unit 28. The touch panel 70 a and the display unit28 can be integrally formed. For example, the touch panel 70 a is formedso that light transmittance does not prevent display of the display unit28, and the touch panel 70 a is attached to an upper layer of a displayscreen of the display unit 28. Input coordinates of the touch panel 70 aand display coordinates on the display unit 28 are associated with eachother. Thereby, it is possible to form a GUI (graphical user interface)as if a user could directly operate a screen displayed on the displayunit 28. The system control unit 50 can detect operations and states ofthe touch panel 70 a described below.

An operation where a finger or a pen which has not touched the touchpanel 70 a newly touches the touch panel 70 a. That is, start of touch(hereinafter referred to as touch-down).

A state where a finger or a pen touches the touch panel 70 a(hereinafter referred to as touch-on).

An operation where a finger or a pen moves on the touch panel 70 a whilethe finger or the pen touches the touch panel 70 a (hereinafter referredto as touch-move).

An operation where a finger or a pen which has touched the touch panel70 a is detached. That is, end of touch (hereinafter referred to astouch-up).

A state where nothing touches the touch panel 70 a (hereinafter referredto as touch-off).

When the touch-down is detected, the touch-on is also detected at thesame time. Normally, the touch-down is continuously detected unless thetouch-up is detected. The touch-move is detected while the touch-on isdetected. Even when the touch-on is detected, if a touch position doesnot move, the touch-move is not detected. The touch-off is detectedafter the touch-up of all fingers and a pen that have touched the touchpanel 70 a is detected.

These operations and states and position coordinates where a finger or apen touches on the touch panel 70 a are notified to the system controlunit 50 through an internal bus, and the system control unit 50determines what operation is performed on the touch panel 70 a based onnotified information. Regarding the touch-move, a moving direction of afinger or a pen that moves on the touch panel 70 a can be determined foreach of vertical and horizontal components on the touch panel 70 a basedon change of the position coordinates. It is determined that a stroke iswritten when the touch-up is performed after the touch-down though acertain touch-move on the touch panel 70 a. An operation to quicklywrite a stroke is called a flick. The flick is an operation to quicklymove a finger by a certain distance while the finger touches on thetouch panel 70 a and then detach the finger from the touch panel 70 a.In other words, the flick is an operation to quickly trace on the touchpanel 70 a as if snapping with the finger. It is possible to determinethat the flick is performed when the touch-move is detected for apredetermined distance or more at a predetermined velocity or more andthen the touch-up is detected. Alternatively, it is determined that adrag is performed when the touch-move is detected for a predetermineddistance or more at less than a predetermined velocity. Further, a touchoperation where a plurality of positions (for example, two points) aretouched at the same time and both touch positions are brought close toeach other is referred to as pinch-in, and a touch operation where bothtouch positions are brought away from each other is referred to aspinch-out. The pinch-out and the pinch-in are collectively referred toas a pinch operation (or simply referred to as pinch). As the touchpanel 70 a, it is possible to use a touch panel of any type selectedfrom various types such as resistive film type, electrostaticcapacitance type, surface acoustic wave type, infrared light type,electromagnetic induction type, image recognition type, and opticalsensor type. Regarding the types, there are types that detect that thereis a touch when the touch panel is touched, and types that detect thatthere is a touch when a finger or a pen approaches the touch panel.However, both types may be used.

A power supply control unit 80 is composed of a battery detectingcircuit, a DC-DC converter, a switch circuit that switches a block to beenergized, and the like, and detects the presence or absence of mountingof battery, a type of the battery, and a remaining battery capacity.Further, the power supply control unit 80 controls the DC-DC converterbased on detection results of the above and an instruction of the systemcontrol unit 50 and supplies a voltage to each unit including therecording medium 200 for a period of time. A power supply unit 81 iscomposed of a primary battery such as an alkaline battery or a lithiumbattery, a secondary battery such as a NiCd battery, a NiMH battery, ora Li battery, an AC adapter, and the like. A recording medium I/F 18 isan interface to the recording medium 200 such as a memory card or a harddisk. The recording medium 200 is a recording medium such as a memorycard for recording captured images. The recording medium 200 is composedof a semiconductor memory, an optical disc, a magnetic disc, or thelike. A communication unit 54 is connected to the outside wirelessly orthrough a wired cable, and transmits/receives an image signal, an audiosignal, and the like. The communication unit 54 can also be connected toa wireless LAN (Local Area Network) and the Internet. The communicationunit 54 can transmit images (including through-images) captured by theimage capture element 22 and images recorded in the recording medium200, and can receive image data and other various information from anexternal apparatus.

An image capture plane phase difference focus detection unit 29 performsfocus detection processing by the phase difference AF by using focusdetection data obtained by the image processing unit 24. Morespecifically, the image processing unit 24 generates a pair of pieces ofimage data formed by light fluxes passing through a pair of pupilregions of the image capturing optical system as focus detection data,and the image capture plane phase difference focus detection unit 29detects a defocus amount based on a shift amount of the pair of piecesof image data. In this way, the image capture plane phase differencefocus detection unit 29 of the present embodiment performs the phasedifference AF (image capture plane phase difference AF) based on anoutput of the image capture element 22 without using a dedicated AFsensor. An operation of the image capture plane phase difference focusdetection unit 29 will be described later in detail.

A TVAF focus detection unit 30 performs focus detection processing ofcontrast AF based on a TVAF evaluation value (contrast information ofimage data) generated by the image processing unit 24. The focusdetection processing of contrast AF detects a focus lens position wherean evaluation value becomes a peak as an in-focus position by moving thefocus lens 104.

In this way, the digital camera of the present embodiment can performboth the phase difference AF and the contrast AF, and the digital cameracan selectively use the phase difference AF or the contrast AF orcombine and use the phase difference AF and the contrast AF depending oncircumstances.

<Configuration of Image Capture Element>

FIGS. 2A and 2B show a part of a light receiving surface of the imagecapture element 22 used as an image sensor. In the image capture element22, pixel portions, each of which has two photodiodes, which arephotoelectric conversion units, for one micro lens, are arranged in anarray form to enable the image capture plane phase difference AF.Thereby, each pixel portion can receive light fluxes from divided exitpupils of a lens barrel. In other words, the image capture element 22has a plurality of pixels, each of which can photoelectrically convertlight fluxes that have passed through different pupil regions of theimage capturing optical system and output a pair of signals for focusdetection.

FIG. 2A is a diagram showing a pixel arrangement of the image captureelement 22 according to the present embodiment. FIG. 2A shows a statewhere a range of six rows in a vertical direction (Y direction) andeight columns in a horizontal direction (X direction) of atwo-dimensional C-MOS area sensor is observed from a lens unit 110 side.The image capture element 22 is provided with a color filter of Bayerarrangement. In pixels in odd-numbered rows, color filters of green (G)and red (R) are alternately arranged in order from left. In pixels ineven-numbered rows, color filters of blue (B) and green (G) arealternately arranged in order from left. In a pixel 211, a circle 211 irepresents an on-chip micro lens. Each of a plurality of rectangles 211a and 211 b arranged inside the on-chip micro lens is a photoelectricconversion unit.

In the image capture element 22, a photoelectric conversion unit of allthe pixels is divided into two parts in the X direction, and aphotoelectric conversion signal of each photoelectric conversion unitand a sum of the photoelectric conversion signals can be independentlyread out. Further, it is possible to obtain a signal corresponding to aphotoelectric conversion signal of one photoelectric conversion unit bysubtracting a photoelectric conversion signal of the other photoelectricconversion unit from the sum of the photoelectric conversion signals.The photoelectric conversion signal of each photoelectric conversionunit may be used as data for the phase difference AF or may be used togenerate a parallax image constituting a 3D (3-dimensional) image.Further, the sum of the photoelectric conversion signals can be used asnormal captured image data.

FIG. 2B is a diagram showing a configuration example of a readoutcircuit of the image capture element 22 of the present embodiment.Horizontal scan lines 152 a and 152 b and vertical scan lines 154 a and154 b are wired in boundary portions of the pixels of the horizontalscan circuit 151 and the vertical scan circuit 153. Signals are readfrom the photoelectric conversion units to the outside through thesescan lines.

FIGS. 3A and 3B are diagrams for explaining a conjugate relation betweenan exit pupil surface of the image capturing optical system and thephotoelectric conversion unit of the image capture element arranged atstatue height zero, that is, close to a center of an image plane in theimage capture apparatus of the present embodiment. The photoelectricconversion unit in the image capture element and the exit pupil surfaceof the image capturing optical system are designed to be in a conjugaterelation by the on-chip micro lens. The exit pupil of the imagecapturing optical system substantially corresponds to a surface where aniris diaphragm for light amount adjustment is generally placed. On theother hand, the image capturing optical system of the present embodimentis a zoom lens having a magnification function. However, when amagnification operation is performed, a distance from an image plane ofthe exit pupil and a size vary depending on an optical type. FIGS. 3Aand 3B show a state where a focal distance of the lens unit 110 islocated at a center between a closest end and an infinity end. By usingan exit pupil distance Zep in this state as a standard value, a shapeand an eccentric parameter according to a statue height (X, Ycoordinates) of the on-chip micro lens are optimally designed.

In FIG. 3A, the lens unit 110 includes a lens barrel member 101 b thatholds the first lens group 101, and a lens barrel member 104 b thatholds the focus lens 104. Further, the lens unit 110 includes anaperture plate 102 a that defines an aperture diameter when thediaphragm 102 is opened and a diaphragm blade 102 b for adjusting theaperture diameter during stopping. Virtual images 101 b, 102 a, 102 b,and 104 b that act as limiting members of a light flux passing throughthe image capturing optical system indicate optical virtual images whenobserving from an image plane. A composite aperture close to thediaphragm 102 is defined as an exit pupil of a lens, and a distance fromthe image plane is defined as Zep as described above.

A pixel 211 is arranged close to a center of the image plane and iscalled a center pixel in the present embodiment. The center pixel 211includes photoelectric conversion units 211 a and 211 b, wiring layers211 e to 211 g, a color filter 211 h, and an on-chip micro lens 211 i inthis order from a lowermost layer. The two photoelectric conversionunits are projected to the exit pupil surface of the image capturingoptical system by the on-chip micro lens 211 i. In other words, the exitpupil of the image capturing optical system is projected to surfaces ofthe photoelectric conversion units through the on-chip micro lens 211 i.

FIG. 3B shows projection images of the photoelectric conversion units onthe exit pupil surface of the image capturing optical system, and theprojection images corresponding to the photoelectric conversion units211 a and 211 b are EP1 a and EP1 b, respectively. In the presentembodiment, the image capture element has a pixel that can obtain anoutput of one of the two photoelectric conversion units 211 a and 211 band a sum of outputs of both photoelectric conversion units. The sum ofoutputs of both photoelectric conversion units is obtained byphotoelectrically converting light fluxes passing through both regionsof projection images EP1 a and EP1 b which are substantially the entirepupil region of the image capturing optical system.

In FIG. 3A, when outermost portions of the light flux passing throughthe image capturing optical system are indicated by L, the light flux Lis regulated by the aperture plate 102 a of the diaphragm, so thatregarding the projection images EP1 a and EP1 b, vignetting hardlyoccurs in the image capturing optical system. In FIG. 3B, the light fluxL in FIG. 3A is indicated by TL. Most of the projection images EP1 a andEP1 b of the photoelectric conversion units is included inside a circleindicated by TL, so that it is known that the vignetting hardly occurs.The light flux L is regulated by only the aperture plate 102 a of thediaphragm, so that TL can be paraphrased as 102 a. In this case, in thecenter of the image plane, a vignetting state of the projection imagesEP1 a and EP1 b is symmetric with respect to the optical axis, so thatlight amounts received respectively by the photoelectric conversionunits 211 a and 211 b are the same.

<Description of Phase Difference AF Focus Detection Operation>

Regarding a plurality of pixels 211 in a predetermined range arranged inthe same pixel row, an image formed by connecting together outputs ofthe photoelectric conversion units 211 a is defined as an AF-A image,and an image formed by connecting together outputs of the photoelectricconversion units 211 b is defined as an AF-B image. As outputs of thephotoelectric conversion units 211 a and 211 b, a pseudo luminance (Y)signal is used, which is calculated by adding outputs of green, red,blue, and green included in a unit arrangement of a color filter.However, the AF-A image and the AF-B image may be formed for each colorof red, blue, and green. By detecting a relative image shift amountbetween the AF-A image and the AF-B image formed in this way by using acorrelation calculation, it is possible to detect a focal point shiftamount (defocus amount) that indicates a focusing state of apredetermined region. In the present embodiment, an output of onephotoelectric conversion unit and a sum of outputs of all photoelectricconversion units are read from the image capture element 22. Forexample, when the output of the photoelectric conversion unit 211 a anda sum of the outputs of the photoelectric conversion units 211 a and 211b are read out, the output of the photoelectric conversion unit 211 b isacquired by subtracting the output of the photoelectric conversion unit211 a from the sum. Thereby, it is possible to obtain both the AF-Aimage and the AF-B image, so that the phase difference AF can berealized.

When performing the phase difference AF, the system control unit 50performs control to read out an output from the image capture element22. Then, the system control unit 50 gives information of a focusdetection region to the image processing unit 24 and instructs the imageprocessing unit 24 to generate data of the AF-A image and the AF-B imagefrom outputs of pixels included in the focus detection region and supplythe data to the image capture plane phase difference focus detectionunit 29. The image processing unit 24 generates the data of the AF-Aimage and the AF-B image and outputs the data to the image capture planephase difference focus detection unit 29 according to the instruction.

In the present embodiment, as an example, a configuration is describedwhere the exit pupil is divided into two parts in the horizontaldirection. However, for some pixels of the image capture element, theexit pupil may be divided into two parts in the vertical direction.Further, a configuration may be employed where the exit pupil may bedivided in both the horizontal and the vertical directions. When pixelswhere the exit pupil is divided in the vertical direction are provided,it is possible to perform phase difference AF corresponding to contrastof an object not only in the horizontal direction but also in thevertical direction.

<Description of TVAF Focus Detection Operation>

Next, the contrast AF (TVAF) will be described with reference to FIG. 4.The contrast AF is realized when the system control unit 50 and the TVAFfocus detection unit 30 repeatedly perform drive of the focus lens andcalculation of evaluation value in cooperation with each other. First,when RAW image data is inputted from the image processing unit 24 intothe TVAF focus detection unit 30, an AF evaluation signal processingcircuit 401 performs extraction of a green (G) signal from a Bayer arraysignal and gamma correction processing where low brightness componentsare enhanced and high brightness components are suppressed. In thepresent embodiment, a case where the TVAF is performed by using thegreen (G) signal is described. However, all signals of red (R), blue(B), and green (G) may be used. Alternatively, the luminance (Y) signalmay be generated by using all RGB colors. An output signal generated bythe AF evaluation signal processing circuit 401 is called a luminancesignal Y in the description below regardless of the type of used signal.

The system control unit 50 sets a focus detection region in a regionsetting circuit 413. The region setting circuit 413 generates a gatesignal that selects a signal in the set region. The gate signal isinputted into a line peak detection circuit 402, a horizontalintegration circuit 403, a line minimum value detection circuit 404, aline peak detection circuit 409, vertical integration circuits 406 and410, and vertical peak detection circuits 405, 407, and 411. A timingwhen the luminance signal Y is inputted into the above circuits iscontrolled so that each focus evaluation value is generated by theluminance signal Y in the focus detection region. A plurality of regionscan be set in the region setting circuit 413 in accordance with thefocus detection region.

Next, a calculation method of a Y peak evaluation value will bedescribed. A gamma-corrected luminance signal Y is inputted into theline peak detection circuit 402, and a Y line peak value for eachhorizontal line is obtained in the focus detection region set in theregion setting circuit 413. An output of the line peak detection circuit402 is peak-held in the vertical direction in the focus detection regionin the vertical peak detection circuit 405, and the Y peak evaluationvalue is generated. The Y peak evaluation value is an index effectivefor determining a high luminance object and a low-light intensityobject.

Next, a calculation method of a Y integral evaluation value will bedescribed. The gamma-corrected luminance signal Y is inputted into thehorizontal integration circuit 403, and an integral value of Y isobtained for each horizontal line in the focus detection region.Further, an output of the horizontal integration circuit 403 isintegrated in the vertical direction in the focus detection region inthe vertical integration circuit 406, and the Y integral evaluationvalue is generated. The Y integral evaluation value can be used as anindex to determine brightness in the entire focus detection region.

Next, a calculation method of a Max−Min evaluation value will bedescribed. The gamma-corrected luminance signal Y is inputted into theline peak detection circuit 402, and a Y line peak value for eachhorizontal line is obtained in the focus detection region. Further, thegamma-corrected luminance signal Y is inputted into the line minimumvalue detection circuit 404, and a minimum value of the luminance signalY is detected for each horizontal line in the focus detection region.The line peak value and the minimum value of the luminance signal Y,which are detected for each horizontal line, are inputted into asubtracter, and (the line peak value−the minimum value) is inputted intothe vertical peak detection circuit 407. The vertical peak detectioncircuit 407 performs peak-hold in the vertical direction in the focusdetection region, and generates the Max−Min evaluation value. TheMax−Min evaluation value is an index effective for determining lowcontrast/high contrast.

Next, a calculation method of a region peak evaluation value will bedescribed. When the gamma-corrected luminance signal Y is passed througha BPF 408, a specific frequency component is extracted and a focussignal is generated. The focus signal is inputted into the line peakdetection circuit 409, and a line peak value for each horizontal line isobtained in the focus detection region. The line peak value is peak-heldin the focus detection region by the vertical peak detection circuit411, and the region peak evaluation value is generated. Variation of theregion peak evaluation value is small even when an object moves in thefocus detection region, so that the region peak evaluation value is anindex effective for restart determination that determines whether tomove from an in-focus state to processing of searching for an in-focuspoint again.

Next, a calculation method of an all line integral evaluation value willbe described. In the same manner as for the region peak evaluationvalue, the line peak detection circuit 409 obtains a line peak value foreach horizontal line in the focus detection region. The line peak valuesare inputted into the vertical integration circuit 410, the line peakvalues are integrated with respect to all the horizontal scan lines inthe vertical direction in the focus detection region, and the all lineintegral evaluation value is generated. A dynamic range of a highfrequency all line integral evaluation value is wide due to effect ofintegration, and the sensitivity of the high frequency all line integralevaluation value is high, so that the high frequency all line integralevaluation value is a main AF evaluation value. Therefore, in thepresent embodiment, a simple expression “focus evaluation value” meansthe all line integral evaluation value.

An AF control unit 50 a of the system control unit 50 acquires eachfocus evaluation value described above and moves the focus lens 104 fora predetermined length in a predetermined direction along the opticalaxis direction through the lens MPU 117. Then, the AF control unit 50 acalculates various evaluation values described above based on newlyobtained image data, and detects a focus lens position where the allline integral evaluation value becomes a maximum value. In the presentembodiment, various AF evaluation values are calculated in a horizontalline direction and a vertical line direction. Thereby, it is possible toperform focus detection on contrast information of an object in thehorizontal direction and the vertical direction which are orthogonal toeach other.

Embodiment 1

Hereinafter, an operation of an embodiment 1 will be described withreference to FIGS. 5 to 8.

FIG. 5 is a flowchart related to an overall operation of the camera mainbody 120 of the image capture apparatus 100 according to the presentembodiment. Each processing in the flowchart is realized when the systemcontrol unit 50 executes a program stored in the non-volatile memory 56after a power switch 72 is operated and a power source is turned on.

In S101, flags, control variables, and the like are initialized. InS111, image capturing settings stored in the system memory 52 are readout. Here, the image capturing settings are setting values of a settingindicating whether to perform focus bracket shooting, the number oftimes of image capturing of a plurality of times of image capturing inthe focus bracket shooting, and a step width of the focus bracketshooting. In the description below, it is assumed that “YES” is selectedas a setting indicating whether to perform focus bracket shooting.

These image capturing settings can be set by pressing the menu button ofthe operation unit 70. The system control unit 50 displays the menuscreen and changes the image capturing settings according to a useroperation performed on the operation unit 70. Here, setting screenexamples of a continuous image capturing operation setting function willbe described with reference to FIGS. 8A to 8E.

FIG. 8A shows a list display of a function 702. A user moves a cursor704 by pressing an up/down/left/right button included in the operationunit 70, and transits to a setting change screen of an arbitraryfunction by pressing a SET button. FIG. 8B is an example of a focusbracket shooting screen. A function title 712 and child functions 714 to718 are displayed. Further, a function 714 and a setting value 720thereof are displayed in a list. Focus bracket shooting 714 is an itemfor setting whether to perform the focus bracket shooting. A settingscreen example is as shown in FIG. 8C, and the user selects a settingvalue from among options 732. The user can select a setting “NO” inaddition to “YES” that is a default value. When “YES” is set, thefunction is performed. When “NO” is set, the function is not performed.The number of times of image capturing 716 is an item for setting thenumber of times of image capturing in the focus bracket shooting. Asetting screen example is as shown in FIG. 8D, and the user sets thenumber of times of image capturing by changing each digit of athree-digit number. A default value is 100. Here, a hundredth place isfocused, and a number in the hundredth place can be changed. At thistime, an index 748 and an index 750 are displayed. The number can bechanged by pressing an up/down button included in the operation unit 70or performing a touch operation on each index. A step width 718 is anitem for setting a step width of the focus lens in the focus bracketshooting. A setting screen example is as shown in FIG. 8E, and the usersets the step width by changing a one-digit number from 1 to 9. Here,the step width 1 indicates a focus step width of a certain degree ofprecision error. A default value is 4. Here, an index 764 and an index766 are displayed. The number can be changed by pressing an up/downbutton included in the operation unit 70 or performing a touch operationon each index. The setting in the focus bracket shooting can beperformed by the settings described above.

Let us return to the description of FIG. 5. In S102, the system controlunit 50 determines a setting position of the mode switching switch 60.When the setting position is set to an image capturing mode, the systemcontrol unit 50 proceeds to S104. When the setting position is set toother than the image capturing mode, the system control unit 50 proceedsto S103. In S103, the system control unit 50 determines the settingposition of the mode switching switch 60. When the setting position isset to a playback mode, the system control unit 50 proceeds to S105.When the setting position is set to other than the playback mode, thesystem control unit 50 proceeds to S106. Details of image capturing modeprocessing in S104 will be described later.

In S106, the system control unit 50 performs processing related to othermodes. The other modes include a communication mode that performstransmission and reception of a file stored in the recording medium 200.In S107, the system control unit 50 determines whether or not the powerswitch 72 is off. When the power switch 72 is on, the system controlunit 50 returns to S102. When the power switch 72 is off, the systemcontrol unit 50 proceeds to S108. When power off processing iscompleted, the operation of the image capture apparatus ends.

FIG. 6 is a flowchart related to the image capturing mode processingperformed by the system control unit 50 according to the presentembodiment.

In S202, a display of a through-image is started on the display unit 28.In S204, it is determined whether an input of an operation instructionis detected by image capturing operation determination processing. Thefirst shutter switch 62, the second shutter switch 64, and a touch-downoperation 70 can be detected by the image capturing operationdetermination processing. When it is detected that the first shutterswitch 62 or the second shutter switch 64 is pressed, the processingproceeds to S208. When the touch-down operation 70 is detected, theprocessing proceeds to S232, and when the touch-down operation 70 is notdetected, the processing proceeds to S204.

In S208, the image capturing operation determination processingdetermines whether the first shutter switch 62 is pressed. When thefirst shutter switch 62 is pressed, the processing proceeds to S210.Otherwise, the processing proceeds to S212. In S210, AF is performedaccording to an AF method of image-sensing plane AF, and AE is performedat the same time. In S212, a display of a through-image is started onthe display unit 28. When the through-image has already been displayed,the content of the display is not changed.

In S214, the image capturing operation determination processingdetermines whether the second shutter switch 64 is pressed. When thesecond shutter switch 64 is pressed, the processing proceeds to S222.Otherwise, the processing proceeds to S216. In S216, the image capturingoperation determination processing determines whether the first shutterswitch 62 is pressed. When the first shutter switch 62 is pressed, theprocessing proceeds to S212. Otherwise, the processing proceeds to S218.In S218, it is determined whether a series of image capturing processingoperations from reading a signal from the image capture element 22 towriting image data into the recording medium 200 have been performed,that is, whether one or more images have been captured. When the seriesof image capturing processing operations have been performed, theprocessing proceeds to S220. Otherwise, the flowchart is ended. In S220,regarding an image that is captured most recently, image data fordisplay (quick review image) stored in the memory 32 is displayed on thedisplay unit 28.

In S222, the system control unit 50 stores a position in the opticalaxis direction OA of the focus lens 104. Thereafter, the processingproceeds to B in FIG. 7. In S232, AF is performed according to an AFmethod of image-sensing plane AF, and AE is performed at the same time.In S234, a display of a through-image is started on the display unit 28.When the through-image has already been displayed, the content of thedisplay is not changed. In S236, the system control unit 50 stores aposition in the optical axis direction OA of the focus lens 104.Thereafter, the processing proceeds to B in FIG. 7.

FIG. 7 is a flowchart of image capturing processing performed by ashutter button operation and a touch-down operation according to thepresent embodiment.

In this flowchart, an operation is described in which an in-focusposition is shifted from an in-focus position where focus detection isperformed during image capturing to a closest side and image capturingis started. Thereby, it is possible to generate a focused image from anin-focus position closer to the closest side than to a position wherefocus detection is performed during image capturing by performing depthcomposition processing using an image outputted by image capturing inpost-processing.

A depth of field when the closest side is focused is shorter than thatwhen the infinity side is focused, so that image capturing should beperformed by sequentially setting in-focus positions with narrower stepwidths in order to generate an in-focus image. The in-focus position inthis case will be described with reference to FIG. 9A. FIG. 9A showsin-focus positions, step widths, and the order of image capturing whenthe image capturing is performed while the in-focus position is shifted.Six in-focus positions from an in-focus position 802 to an in-focusposition 812 are shown. The leftmost in-focus position is an in-focusposition on the closest side, and the rightmost in-focus position is anin-focus position on the infinity side. Intervals between each in-focusposition are step widths 822 to 830. The in-focus position where thefocus detection is performed is a position indicated by the in-focusposition 806. Intervals from the in-focus position where the focusdetection is performed to the in-focus position on the infinity side arein accordance with a step width menu from the step width 826 to the stepwidth 830. On the other hand, intervals from the in-focus position wherethe focus detection is performed to the in-focus position on the closestside are step widths shorter than a step width menu from the step width822 to the step width 824. In-focus positions of an image to be capturedare (1) to (6) sequentially located from the closest side to theinfinity side. By performing image capturing while the in-focus positionis changed in this way, it is possible to generate a focused image froman in-focus position closer to the closest side than the position wherethe focus detection is performed during image capturing.

Let us return to the description of FIG. 7. In S302, the system controlunit 50 starts counting of the number of captured images of the focusbracket shooting. In S304, the system control unit 50 acquires lensdrive method information stored in the lens memory 118 through the lensMPU 117 and determines a lens drive method. When the lens drive methodis a DC motor drive method, the processing proceeds to S312. Otherwise,the processing proceeds to S306. In S306, the system control unit 50sets a focus step, by which the focus lens 104 is moved, to a valuesmaller than a step width set in the menu. For example, when a stepwidth setting is “4”, the focus step is set to “3” which is a valuesmaller than 4.

In S308, the system control unit 50 moves the focus lens 104 toward theclosest side by the focus step width set in step S306 through the lensMPU 117. In S310, the system control unit 50 determines whether an errorsignal is received from the lens MPU 117, that is, whether the focuslens 104 cannot move any more toward the closest side. When the errorsignal is received, the processing proceeds to S312. Otherwise, theprocessing proceeds to S308. In S312, the system control unit 50acquires the current in-focus position through the lens MPU 117 anddetermines whether the current in-focus position is the same as anin-focus position at the time of focus detection or is located on theinfinity side. When the current in-focus position is the same as thein-focus position at the time of focus detection or is located on theinfinity side, the processing proceeds to S314. Otherwise, theprocessing proceeds to S322.

In S314, the system control unit 50 sets a step width set by the menu toa focus step of the image capturing setting. In S322, the system controlunit 50 performs a series of image capturing processing operations fromreadout of a signal from the image capture element 22 to imageprocessing by the image processing unit 24. In S324, the system controlunit 50 writes image data processed in S322 into the recording medium200. In S326, the system control unit 50 increments an image capturingcount stored in the system memory 52 by 1.

In S328, the system control unit 50 determines whether the imagecapturing count stored in the system memory 52 is smaller than thenumber of images to be captured that is set from the menu. When theimage capturing count is smaller than the number of images to becaptured that is set from the menu, the processing proceeds to S330.Otherwise, the processing proceeds to S338. In S330, the system controlunit 50 moves the focus lens 104 toward the infinity side by the focusstep width set in step S314 through the lens MPU 117. In S332, thesystem control unit 50 determines whether an error signal is receivedfrom the lens MPU 117, that is, whether the focus lens 104 cannot moveany more toward the infinity side. When the error signal is received,the processing proceeds to S338. Otherwise, the processing proceeds toS334.

In S334, the system control unit 50 determines whether the secondshutter switch 64 is pressed. When the second shutter switch 64 ispressed, the processing proceeds to S338. Otherwise, the processingproceeds to S336. Thereby, even while image capturing is beingperformed, when the second shutter switch is pressed again, the imagecapturing can be cancelled. In S336, the system control unit 50determines whether a back surface display panel 28 a is touched and thetouch panel 70 a detects touch-down. When the touch panel 70 a detectstouch-down, the processing proceeds to S338. Otherwise, the processingproceeds to S322. Thereby, even while image capturing is beingperformed, when the back surface display panel 28 a is touched, theimage capturing can be cancelled. In S338, the system control unit 50resets the image capturing count stored in the system memory 52.Thereafter, the processing proceeds to C in FIG. 7.

In this way, by the flows of FIGS. 5 to 7, the intervals from thein-focus position where the focus detection is performed to the in-focusposition on the closest side are step widths shorter than the step widthmenu. By performing image capturing while the in-focus position ischanged, it is possible to generate a focused image from an in-focusposition closer to the closest side than the position where the focusdetection is performed during image capturing.

In S304, when the lens drive method is the DC motor drive method, theimage capturing is performed without shifting the in-focus position fromthe in-focus position where focus detection is performed toward theclosest side. However, in the same manner as in the case where the lensdrive method is not the DC motor drive method, the image capturing maybe performed by shifting the in-focus toward the closest side.

In the way described above, it is possible to perform image capturing ina depth range, where depth composition is desired, by shifting thein-focus position toward the closest side for an object whose frontregion is difficult to be focused when image capturing is performed.Further, it is possible to enhance perceived resolution in a region fromthe in-focus position to the closest side.

Embodiment 2

When the in-focus position is moved toward the closest side after theimage capture plane phase difference AF is performed at the time offocus detection, the in-focus position is determined while blurdetermination is performed by an AF method different from the imagecapture plane phase difference AF such as, for example, TVAF. Thereby,the in-focus position may be set to an appropriate object position onthe closest side. The in-focus position in this case will be describedwith reference to FIG. 9B.

In FIG. 9B, only portions different from those in FIG. 9A will bedescribed. The intervals from the in-focus position where the focusdetection is performed by the image capture plane phase difference AF tothe in-focus position on the infinity side are in accordance with thestep width menu from the step width 826 to the step width 830. On theother hand, the intervals of the in-focus positions on the closest side,which are determined while blur determination is performed by TVAF, arestep widths from the step width 832 to the step width 834. The stepwidths at this time are determined while blur determination is performedby TVAF, so that the step widths are intervals different from the stepwidth menu. In-focus positions of an image to be captured are (1) to (6)sequentially located from the closest side to the infinity side.

By performing image capturing while the in-focus position is changed inthis way, it is possible to generate a focused image from an in-focusposition closer to the closest side than the position where the focusdetection is performed during image capturing.

Hereinafter, an operation of an embodiment of the disclosure will bedescribed with reference to FIG. 10.

FIG. 10 is a flowchart of image capturing processing performed by theshutter button operation and the touch-down operation according to thepresent embodiment. In this flowchart, only portions different fromthose in the embodiment 1 will be described.

In S342, the TVAF focus detection unit 30 acquires a contrast value andperforms blur determination.

In S344, the system control unit 50 determines whether there is a regionwhere the contrast value is high and which is equal to or greater than acertain region as a processing result of S342. When there is a regionwhere the contrast value is high and which is equal to or greater than acertain region, the processing proceeds to S346. Otherwise, theprocessing proceeds to S308. Thereby, it is possible to use an imageincluding a region where the contrast value is high, that is, a focusedregion, as a material image for depth composition. As a result, also inthis region, it is possible to generate a composite image with aperceived resolution by the depth composition.

In S346, the system control unit 50 stores an in-focus position into thesystem memory 52. The in-focus position stored here will be describedwith reference to FIG. 9B. The in-focus position is being fixed in orderfrom an image capturing order (2) to an image capturing order (1). Thein-focus position stored here is used to determine the image capturingorder (1), the image capturing order (2), and the image capturing order(3), and an in-focus position 814, an in-focus position 816, and anin-focus position 806 where image capturing is performed, when the imagecapturing is started.

In S348, the system control unit 50 obtains a difference from thecurrent in-focus position to the next in-focus position and assigns thedifference as a focus step. The focus step here will be described withreference to FIG. 9B. The focus step is the step width 832 from thein-focus position 814 to the in-focus position 816 when image capturingof the image capturing order (1) is performed.

In this way, it is possible to perform image capturing according to anin-focus position determined while blur determination is performed byTVAF by the flow in FIG. 10. In S342, the blur determination isperformed by using the TVAF focus detection unit 30. However, if thereis another AF method that can perform blur determination, the AF methodmay be used.

In the way described above, it is possible to perform image capturing ina depth range, where depth composition is desired, by shifting thein-focus position toward the closest side for an object whose frontregion is difficult to be focused when image capturing is performed.Further, it is possible to enhance perceived resolution in a region fromthe in-focus position to the closest side.

Embodiment 3

A focusing accuracy at the time of focus detection may be loosedepending on an object. Therefore, it is possible to compensate aprecision error by performing image capturing by shifting the in-focusposition toward the closest side by a step width of about the precisionerror. Here, the step width of about the precision error is defined as 1of focus step setting. The in-focus position in this case will bedescribed with reference to FIG. 9C.

In FIG. 9C, only portions different from those in FIGS. 9A and 9B willbe described. Intervals from the in-focus position where the focusdetection is performed to the in-focus position on the infinity side arein accordance with a step width menu from the step width 826 to the stepwidth 830. An interval from the in-focus position where the focusdetection is performed to the in-focus position on the closest side isthe step width 836. This is a step width that can compensate theprecision error. In-focus positions of an image to be captured are (1)to (5)) sequentially located from the closest side to the infinity side.

By performing image capturing while the in-focus position is changed inthis way, it is possible to generate a focused image from an in-focusposition closer to the closest side than the position where the focusdetection is performed during image capturing.

Hereinafter, an operation of an embodiment of the disclosure will bedescribed with reference to FIG. 11. FIG. 11 is a flowchart of imagecapturing processing performed by the shutter button operation and thetouch-down operation according to the present embodiment. In thisflowchart, only portions different from those in the embodiment 1 and 2will be described.

In S352, the system control unit 50 sets a minimum value different fromthe focus step setting to a focus step where the focus lens 104 ismoved. When the focus step setting is 4, the system control unit 50 sets1 as the minimum value, which is a step width of about the precisionerror. Thereby, it is possible to use an image that covers a range ofabout a focus precision error as a material image for depth composition.As a result, also in the range of about a focus precision error, it ispossible to generate a composite image with a perceived resolution bythe depth composition.

In this way, it is possible to perform image capturing by returning thein-focus position toward the closest side by a step width that cancompensate the precision error. In S352, the minimum value 1 is set as afocus step. However, the focus step is not limited to 1 if the precisionerror can be compensated.

In the way described above, it is possible to perform image capturing ina depth range, where depth composition is desired, by shifting thein-focus position toward the closest side for an object whose frontregion is difficult to be focused when image capturing is performed.Further, it is possible to enhance perceived resolution in a region fromthe in-focus position to the closest side.

According to the embodiment described above, it is possible to providean image capture apparatus that can acquire a focused image from anobject whose front region is difficult to be focused.

Other Embodiments

Embodiment(s) of the disclosure can also be realized by a computer of asystem or apparatus that reads out and executes computer executableinstructions (e.g., one or more programs) recorded on a storage medium(which may also be referred to more fully as a ‘non-transitorycomputer-readable storage medium’) to perform the functions of one ormore of the above-described embodiment(s) and/or that includes one ormore circuits (e.g., application specific integrated circuit (ASIC)) forperforming the functions of one or more of the above-describedembodiment(s), and by a method performed by the computer of the systemor apparatus by, for example, reading out and executing the computerexecutable instructions from the storage medium to perform the functionsof one or more of the above-described embodiment(s) and/or controllingthe one or more circuits to perform the functions of one or more of theabove-described embodiment(s). The computer may comprise one or moreprocessors (e.g., central processing unit (CPU), micro processing unit(MPU)) and may include a network of separate computers or separateprocessors to read out and execute the computer executable instructions.The computer executable instructions may be provided to the computer,for example, from a network or the storage medium. The storage mediummay include, for example, one or more of a hard disk, a random-accessmemory (RAM), a read only memory (ROM), a storage of distributedcomputing systems, an optical disk (such as a compact disc (CD), digitalversatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, amemory card, and the like.

In the embodiment described above, a case where the disclosure isapplied to a digital camera whose lens is detachable is described as anexample. However, the disclosure is not limited to this example. Thatis, the disclosure can be applied to any device having an image captureelement. The disclosure can also be applied to a digital camera and avideo camera whose lens cannot be replaced. Further, the disclosure canbe applied to apparatuses that can capture an image, such as a mobilephone terminal, a portable image viewer, a television set with a camera,a digital photo frame, a music player, a game machine, and an electronicbook reader.

While the disclosure has been described with reference to exemplaryembodiments, it is to be understood that the disclosure is not limitedto the disclosed exemplary embodiments. The scope of the followingclaims is to be accorded the broadest interpretation to encompass allsuch modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No.2018-126164, filed Jul. 2, 2018, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An apparatus comprising: a sensor having aplurality of pixels, each of which can photoelectrically convert lightfluxes that have passed through different pupil regions of an opticalsystem including a focus lens and output a pair of signals for focusdetection; a memory device that stores a set of instructions; and atleast one processor that executes the set of instructions to functionas: a first focus detection unit that detects a focusing state based onan output from the sensor, a setting unit that sets a step width of aposition of the focus lens, a control unit that controls to perform aplurality of times of image capturing based on the set step width, adisplay unit that displays an item for selecting a step width of theposition of the focus lens for performing the plurality of times ofimage capturing, wherein, in a case where a user selects a step width,the setting unit sets a step width of the position of the focus lensbased on the step width selected by the user using an in-focus positionbased on a result of the focus detection by the first focus detectionunit as a reference, and wherein the setting unit sets a step width fromthe reference toward a closest side to a value smaller than a step widthfrom the reference toward the infinity side.
 2. The apparatus accordingto claim 1, further comprising: a second focus detection unit thatacquires a focus evaluation value indicating a contrast of an imagebased on an output from the sensor and performs focus detection based onthe focus evaluation value; and a determination unit that acquires thefocus evaluation value and determines an in-focus position when anin-focus position moves in an image capturing from an in-focus positionbased on a result of focus detection by the second focus detection unittoward the closest side.
 3. A method of an apparatus having a sensorhaving a plurality of pixels, each of which photoelectrically convertslight fluxes that have passed through different pupil regions of anoptical system including a focus lens and output a pair of signals forfocus detection, the method comprising: detecting a focusing state basedon an output from the sensor; setting a step width of a position of thefocus lens; controlling to perform a plurality of times of imagecapturing based on the set step width by the setting; and displaying anitem for selecting a step width of the position of the focus lens forperforming the plurality of times of image capturing, wherein, in a casewhere a user selects a step width, a step width of the position of thefocus lens is set based on the step width selected by the user using anin-focus position based on a result of the focus detection as areference, and wherein a step width from the reference toward theclosest side is set to a value smaller than a step width from thereference toward the infinity side.
 4. The method according to claim 3,further comprising: acquiring a focus evaluation value indicating acontrast of an image based on an output from the sensor and performingfocus detection based on the focus evaluation value; and acquiring thefocus evaluation value and determining an in-focus position when anin-focus position moves in an image capturing from an in-focus positionbased on a result of focus detection by the acquiring a focus evaluationvalue indicating a contrast of an image toward the closest side.
 5. Anon-transitory computer readable storage medium storing a program ofinstructions for causing a computer to perform a method of an apparatushaving a sensor having a plurality of pixels, each of whichphotoelectrically converts light fluxes that have passed throughdifferent pupil regions of an optical system including a focus lens andoutput a pair of signals for focus detection, the method comprising:detecting a focusing state based on an output from the sensor; setting astep width of a position of the focus lens; controlling to perform aplurality of times of image capturing based on the set step width by thesetting; and displaying an item for selecting a step width of theposition of the focus lens for performing the plurality of times ofimage capturing, wherein, in a case where a user selects a step width, astep width of the position of the focus lens is set based on the stepwidth selected by the user using an in-focus position based on a resultof the focus detection as a reference, and wherein a step width from thereference toward the closest side is set to a value smaller than a stepwidth from the reference toward the infinity side.
 6. The non-transitorycomputer readable storage medium according to claim 5, furthercomprising: acquiring a focus evaluation value indicating a contrast ofan image based on an output from the sensor and performing focusdetection based on the focus evaluation value; and acquiring the focusevaluation value and determining an in-focus position when an in-focusposition moves in an image capturing from an in-focus position based ona result of focus detection by the acquiring a focus evaluation valueindicating a contrast of an image toward the closest side.